public class MyList {
	public static void main(String [] args) {
		System.out.println("插入之前");
		//选用合适的构造方法，用你学号前后各两名同学的学号创建四个结点
		Node<String>  node1 = new Node<String>("5305", null);
		Node<String>  node2 = new Node<String>("5306", null);
		Node<String>  node3 = new Node<String>("5308", null);
		Node<String>  node4 = new Node<String>("5309", null);
		
		//把上面四个节点连成一个没有头结点的单链表
		node1.next = node2;
		node2.next = node3;
		node3.next = node4;

		//遍历单链表，打印每个结点的
		for(Node current = node1; current != null ; current = current.next){
			System.out.println(current.data);
		}
		//把你自己插入到合适的位置（学号升序）
		System.out.println("插入之后");
		Node<String> nodeMy = new Node<String>("5307",null);
		node2.next = nodeMy;
		nodeMy.next = node3;
		//遍历单链表，打印每个结点的
		for(Node current = node1; current != null ; current = current.next){
			System.out.println(current.data);
		}
		System.out.println("删除之后");
		//从链表中删除自己
		node2.next = node3;
		//遍历单链表，打印每个结点的
		for(Node current = node1; current != null ; current = current.next){
			System.out.println(current.data);
		}
	}
}
